package com.zhijian.medical.controller;

import com.zhijian.medical.entity.dto.HstMeetingV2MeetingResponseDto;
import com.zhijian.medical.entity.vo.request.HstMeetingV2SaveOrUpdateVo;
import com.zhijian.medical.entity.vo.request.HstMeetingV2SearchVo;
import com.zhijian.medical.service.HstMeetingV2Service;
import com.zhijian.medical.util.Page;
import com.zhijian.response.annotation.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Description: TODO
 * @Author: hcg
 * @Date: 2024/11/22
 * @Version: 1.0
 */
@Slf4j
@Controller
@Api(tags = "好视通会议相关V2")
public class HstMeetingV2Controller {

    @Autowired
    private HstMeetingV2Service hstMeetingV2Service;

    @Response
    @PostMapping("/hst/v2")
    @ApiOperation("新增")
    public boolean create(@RequestBody HstMeetingV2SaveOrUpdateVo param) {
        log.info("{} - {}| insert info", this.getClass().getSimpleName(), param);
        return hstMeetingV2Service.createMeeting(param);
    }

    /**
     * 查询会议列表
     *
     * @param searchVo
     * @return
     */
    @Response
    @PostMapping("/hst/v2/page")
    @ApiOperation("查询会议列表")
    public Page<HstMeetingV2MeetingResponseDto.PageV2Bean.DataV2Bean> searchMeeting(@RequestBody HstMeetingV2SearchVo searchVo) {
        return hstMeetingV2Service.searchMeeting(searchVo);
    }
}
